﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ZhimeiSoft.Framework.Client.Control.DateTimeGrid
{
    public partial class DayDateTimeForHour : UserControl, IDateTimeView
    {
        private System.DateTime dtHour = new DateTime();

        public DayDateTimeForHour()
        {
            InitializeComponent();
        }

        public bool timePanelVisible
        {
            get
            {
                return panelTime.Visible;
            }
            set
            {
                panelTime.Visible = value;
            }
        }


        #region IDateTimeView 成员

        public System.DateTime GetDateTime()
        {
            return dtHour;
        }

        public void SetDateTime(System.DateTime dateTime)
        {
            labelHour.Text = dateTime.Hour.ToString();
            dtHour = new DateTime(dateTime.Ticks);
            if (dateTime.Year == DateTime.Now.Year && dateTime.Month == DateTime.Now.Month &&
                    dateTime.Day == DateTime.Now.Day && dateTime.Hour == DateTime.Now.Hour)
            {
                panelTime.Style.BackColor1.Color = Color.LightSteelBlue;
                panelTime.Style.BackColor2.Color = Color.LimeGreen;
            }
            else
            {
               panelTime.Style.BackColor1.Color = Color.FromArgb(227, 239, 255);
               panelTime.Style.BackColor2.Color = Color.FromArgb(175, 210, 255); 
            }
        }

        public void AddItem(string valueList)
        {
            throw new NotImplementedException();
        }

        public int GetItemID()
        {
            throw new NotImplementedException();
        }

        public void DelItem(int indexID)
        {
            throw new NotImplementedException();
        }

        public void InitDate(System.DateTime dtInit)
        {
            throw new NotImplementedException();
        }
        public void SetEffectiveColor(bool bEffective)
        {
            throw new NotImplementedException();
        }
        /// <summary>
        /// 获取当前数据
        /// </summary>
        /// <returns></returns>
        public DataRow GetCurrDataRow()
        {
            throw new NotImplementedException();
        }
        /// <summary>
        /// 获取当前数据
        /// </summary>
        /// <returns></returns>
        public object GetCurrValue()
        {
            throw new NotImplementedException();
        }
        /// <summary>
        /// 数据绑定
        /// </summary>
        /// <param name="dsData">绑定</param>
        public void SetDataBind(DataSet dsData, String displayFieldKey, string valueFieldKey, string timeKey)
        {
            throw new NotImplementedException();
        }
        #endregion
    }
}
